﻿<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="StoreHouseMaintain.aspx.vb" Inherits="WebForm_StoreHouseMaintain" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:HiddenField ID="hiDBName" runat="server" />
            <asp:ObjectDataSource ID="dbStoreHouse" runat="server" 
                InsertMethod="InsertStoreHouse" SelectMethod="GetStoreHouse" 
                TypeName="AssetManage.BBL.StoreHouseBBL" UpdateMethod="UpdateStoreHouse" 
                DeleteMethod="DeleteStoreHouse">
                <DeleteParameters>
                    <asp:Parameter Name="id" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="id" Type="String" />
                    <asp:Parameter Name="name" Type="String"  ConvertEmptyStringToNull ="false" DefaultValue =""/>
                    <asp:Parameter Name="Desc" Type="String" ConvertEmptyStringToNull ="false" DefaultValue =""/>
                   <asp:ControlParameter ControlID="hiUID" Name="UID" PropertyName="Value" 
                        Type="String" />
                     <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" 
                        Type="String" />
                </UpdateParameters>
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtHouse_ID" Name="id" PropertyName="Text" ConvertEmptyStringToNull ="false" DefaultValue =""
                        Type="String" />
                    <asp:ControlParameter ControlID="txtName" Name="name" PropertyName="Text" ConvertEmptyStringToNull ="false" DefaultValue =""
                        Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" 
                        Type="String" />
                </SelectParameters>
                <InsertParameters>
                    <asp:Parameter Name="id" Type="String" />
                    <asp:Parameter Name="name" Type="String" ConvertEmptyStringToNull ="false" DefaultValue =""/>
                    <asp:Parameter Name="Desc" Type="String" ConvertEmptyStringToNull ="false" DefaultValue =""/>
                      <asp:ControlParameter ControlID="hiUID" Name="UID" PropertyName="Value" 
                        Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" 
                        Type="String" />
                </InsertParameters>
            </asp:ObjectDataSource>
            <table border="1" width="900px">
                <tr>
                    <td style="text-align: center" colspan="6">
                        <asp:Label ID="lblTitle" runat="server" meta:resourcekey="lblTitle" Font-Bold="True"
                            Font-Size="24px"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="Label2" runat="server" meta:resourcekey="lblHouseID"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtHouse_ID" runat="server"></asp:TextBox>
                    </td>
                    <td align="right">
                       <asp:Label ID="Label3" runat="server" meta:resourcekey="lblName"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                    </td>
                    <td align="right">
                    </td>
                    <td>
                    </td>
                </tr>
                <tr style="vertical-align: text-top">
                   
                    
                    <td  colspan="6">
                        <asp:Panel ID="plInsert" runat="server" BackColor="#E7FEC2" Height="100px" 
                            Width="700px">
                            <table border="1" width="700px">
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="Label1" runat="server" meta:resourcekey="lblHouseID"></asp:Label>
                                        </td>
                                    <td>
                                        <asp:TextBox ID="txtHouse_IDIns" runat="server"></asp:TextBox>
                                    </td>
                                    <td style="text-align: right">
                                        <asp:Label ID="Label4" runat="server" meta:resourcekey="lblName"></asp:Label></td>
                                    <td>
                                        <asp:TextBox ID="txtNameIns" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:Label ID="Label5" runat="server" meta:resourcekey="lblDesc"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtDescIns" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center" colspan="6">
                                        <asp:Button ID="btnSave" runat="server" meta:resourcekey="btnSave" />
                                        <asp:Button ID="btnCancel" runat="server" meta:resourcekey="btnCancel" />
                                    </td>
                                </tr>
                            </table>
                            <br />
                        </asp:Panel>
                        <asp:Button ID="btnDummy" runat="server" Style="display: none" SkinID="null" />
                  <ajaxToolkit:ModalPopupExtender ID="mpIns" runat="server" TargetControlID="btnInsert" X="20" Y="60"
                  PopupControlID="plInsert" CancelControlID="btnCancel" PopupDragHandleControlID="plInsert" />
                    </td>
                    
                </tr>
                <tr style="vertical-align: text-top">
                    <td colspan="6" style="text-align: center">
                        <asp:Button ID="btnInsert" runat="server" meta:resourcekey="btnInsert" />
                        <asp:Button ID="btnQuery" runat="server" meta:resourcekey="btnQuery" />
                    </td>
                </tr>
                <tr style="vertical-align: text-top" >
                    <td colspan="6">
                        <TServerControl:TGridView ID="gvStoreHouse" runat="server" AllowHoverEffect="False"
                            AllowHoverSelect="False" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="dbStoreHouse"
                            ShowFooterWhenEmpty="False" ShowHeaderWhenEmpty="True" SkinID="pager" TotalRowCount="0"
                            Width="900px" DataKeyNames="id">
                            <Columns>
                                <asp:TemplateField>
                                    <EditItemTemplate>
                                        <asp:Button ID="btnDelette" runat="server" CommandName="Update" meta:resourcekey="btnUpdate" />
                                         <asp:Button ID="btnCancel" runat="server" CommandName="Cancel" meta:resourcekey="btnCancel" />
                                        
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        
                                        <asp:Button ID="btnEdit" runat="server" CommandName="Edit" meta:resourcekey="btnEdit"
                                            CommandArgument='<%# Bind("id") %>'></asp:Button>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                
                                <EditItemTemplate>
                                        
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        
                                        <asp:Button ID="btnDelette" runat="server" CommandName="Delete" meta:resourcekey="btnDelete"
                                            CommandArgument='<%# Bind("id") %>'></asp:Button>
                                    </ItemTemplate>
                                
                                </asp:TemplateField>
                                <asp:BoundField  DataField="id" meta:resourcekey="colHouseID" ReadOnly ="true"  />
                                <asp:BoundField  DataField="Name"  meta:resourcekey="colName" />
                                <asp:BoundField DataField="Desc"   meta:resourcekey="colDesc"  />
                                
                                   
                                <asp:BoundField DataField="CrtDate" DataFormatString ="{0:yyyy/MM/dd HH:mm:ss }" meta:resourcekey="colCrtDate"  ReadOnly="true" />
                                <asp:BoundField DataField="CrtName" meta:resourcekey="colCrtName"  ReadOnly="true"  />
                                <asp:BoundField DataField="ModiDate" DataFormatString ="{0:yyyy/MM/dd HH:mm:ss }" meta:resourcekey="colModiDate"  ReadOnly="true" />
                                <asp:BoundField DataField="ModiName" meta:resourcekey="colModiName"  ReadOnly="true"  />
                               
                            </Columns>
                            <EmptyDataTemplate>
                                <asp:Label ID="lblEmpty" runat="server" ForeColor="Red" meta:resourcekey="lblEmpty"></asp:Label>
                            </EmptyDataTemplate>
                        </TServerControl:TGridView>
                       
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
